<!--#include virtual="/dzps/p1.asp"-->
<!DOCTYPE html>
<html>
<head>
  <title>登入 - <%=val("webtitle")%></title>
<%
	easp.include "h.asp"
%>
</head>
<body>
  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
    <div class="layadmin-user-login-main">
      <div class="layadmin-user-login-box layadmin-user-login-header">
        <h2><%=val("webtitle")%></h2>
        <p><%=val("website")%></p>
      </div>
      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">

        <div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
          <input type="text" name="username" id="LAY-user-login-username" lay-verify="required" placeholder="用户名" class="layui-input">
        </div>
        <div class="layui-form-item">
          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
          <input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="密码" class="layui-input">
        </div>
	
        <div class="layui-form-item" style="margin-bottom: 20px;">
          <a href="reg.asp" class="layadmin-user-jump-change layadmin-link" style="margin-top: 7px;">注册帐号</a>
        </div>
        <div class="layui-form-item">
          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit" id="LAY-user-login-submit">登 入</button>
        </div>
        <div class="layui-form-item">
          <button class="layui-btn" data-type="login_a">测 试</button>
        </div>		
      </div>
    </div>
    <div class="layui-trans layadmin-user-login-footer">
      <p>© 2020 <a href="http://www.xx.com/" target="_blank">xx.com</a></p>
      <!--<p>
        <span><a href="http://www." target="_blank">获取授权</a></span>
        <span><a href="http://www." target="_blank">在线演示</a></span>
      </p>-->
    </div>
  </div>
  <script src="/dzps/src/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '/dzps/src/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'user'], function(){
    var $ = layui.$
    ,setter = layui.setter
    ,admin = layui.admin
    ,form = layui.form;
	var active={
		login_a:function(){
			layer.msg("tt");
			alert("tt");
		}
	};
    $('.layui-btn').on('click', function(){
      var type = $(this).data('type');
      active[type] ? active[type].call(this) : '';
    });


    form.on('submit(LAY-user-login-submit)', function(obj){
      admin.req({
        url: layui.setter.base + 'lib/reg.asp?action=login' 
		,type:'post'
        ,data: obj.field
        ,done: function(res){
		if(res.code=="0"){
          layer.msg(res.msg, {offset: '15px',icon: 1,time: 1000}, function(){
            location.href = '../'; 
          });
		}else
		{
          layer.msg(res.msg, {offset: '15px',icon: 1,time: 1000}, function(){
          });	
		}		
        }
      });
    });
	$("#LAY-user-login-username").keypress(function (e) {
		if (e.which == 13) {
			$("#LAY-user-login-password").focus();					
		}
	});
	$("#LAY-user-login-password").keypress(function (e) {
		if (e.which == 13) {
			$("#LAY-user-login-submit").click();					
		}
	});	
	$("input:first").focus();
  });
  </script>
</body>
</html>